package com.fisionlabs.analizer.chain.link;

import com.fisionlabs.queue.PacketQueue;

import jpcap.packet.IPPacket;
import jpcap.packet.Packet;

public class IPLink extends PacketLink{
	public IPLink(){
		
	}
	
	@Override
	public boolean action(Packet packet) {
       if (packet instanceof IPPacket) 
       {
    	   System.out.println("IP Packet");
    	   IPPacket ipPacket = (IPPacket)packet;
    	   PacketQueue.getInstance().addPacket(ipPacket);
       }
       else
          if (next != null) 
          	next.action(packet);
       
       return false;
	}	
}
